package com.itheima.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

public interface OrderMapper extends BaseMapper<Order> {

//根据用户的订单id 查询预约成功信息
    @Select("select tor.ORDERDATE as orderDate ,tor.ORDERTYPE as orderType,tse.`NAME` as setmeal ,tme.`NAME` as member" +
            " from  t_order tor, t_setmeal tse, t_member tme" +
            "  where tor.ID =  #{id} and tor.MEMBER_ID = tme.ID and tor.SETMEAL_ID = tse.ID ")
    Map findfindOrderById(@Param("id") String id);

}
